<?php

$arr = [1, 2, 3, 5, 6, 7];


foreach ($arr as $k => $v) {//可以指定输出k和v
    echo $k;
    if ($k === 3) {
        echo "计数本轮循环";
        continue;//结束本轮循环
    }
    echo PHP_EOL;
}
echo PHP_EOL;
echo PHP_EOL;

foreach ($arr as $v) {//默认指定v
    echo $v;
    echo PHP_EOL;
    break;//退出循环
}


